<template>
  <div>
    <!-- <Gantetu
      :dataAll="dataAll"
      @changeType="changeType"
      v-if="type === '甘特图'"
    ></Gantetu> -->
    <Tab :dataAll="dataAll" @changeType="changeType"></Tab>
  </div>
</template>

<script>
import Gantetu from "./components/Gantetu.vue";
import Tab from "./components/Tab.vue";
// import { getDeviceTasksList } from "@/api/deviceGantt";
import { getTaskDownLoadInfos } from "@/api/deviceOperation";
export default {
  components: { Gantetu, Tab },
  data() {
    return {
      type: "列表",
      dataAll: []
    };
  },
  mounted() {
    getTaskDownLoadInfos({
      page: 1,
      pageSize: 0,
      parentTaskNumber: "ROOT"
    }).then(res => {
      this.dataAll = res.data.results;
    });
  },
  methods: {
    changeType(type) {
      this.type = type;
    }
  }
};
</script>

<style></style>
